
#ifndef HUFFMANIMAGECOMPRESSION_UtilBitSet_H
#define HUFFMANIMAGECOMPRESSION_UtilBitSet_H

#include <string>
using namespace std;

// Huffman encode value element
class UtilBitSet {
private:
    uint32_t len;
    unsigned char *data;

    void initFromOther(const UtilBitSet& other);

public:
    UtilBitSet();

    UtilBitSet(const UtilBitSet&);

    ~UtilBitSet();

    uint32_t length() const ;

    bool append(unsigned char);

    bool pop_back();

    bool operator[] (uint32_t) const;

    UtilBitSet& operator=(const UtilBitSet&);

    unsigned char* getData() const;

    static const uint32_t DataBlockLength;
};

#endif  //UtilBitSet_H
